using System;
using System.Collections.Generic;
using System.Text;
using THSLib;
using THSERP.BaseProvider;
using THSERP.BusinessEntities;
namespace THSERP.Modules.BranchStatistics
{
    public class BranchStatisticsEntities : ERPModuleEntities
    {
        #region variables
        private THSList<ARInvoicesInfo> lstARInvoices;
        private THSList<ICReceiptsInfo> lstICReceipts;
        private THSList<ICTransfersInfo> lstICTransfers;
        private THSList<APReturnSuppliersInfo> lstAPReturnSuppliers;
        private THSList<ARSaleOrdersInfo> lstARSaleOrders;
        #endregion

        #region Properties
        public THSList<ARInvoicesInfo> ARInvoicesList
        {
            get
            {
                return lstARInvoices;
            }
            set
            {
                lstARInvoices = value;
            }
        }
        public THSList<ICReceiptsInfo> ICReceiptsList
        {
            get
            {
                return lstICReceipts;
            }
            set
            {
                lstICReceipts = value;
            }
        }
        public THSList<ICTransfersInfo> ICTransfersList
        {
            get
            {
                return lstICTransfers;
            }
            set
            {
                lstICTransfers = value;
            }
        }

        public THSList<APReturnSuppliersInfo> APReturnSuppliersList
        {
            get
            {
                return lstAPReturnSuppliers;
            }
            set
            {
                lstAPReturnSuppliers = value;
            }
        }

        public THSList<ARSaleOrdersInfo> ARSaleOrdersList
        {
            get
            {
                return lstARSaleOrders;
            }
            set
            {
                lstARSaleOrders = value;
            }
        }
        #endregion

        #region Contractor
        public BranchStatisticsEntities()
            : base()
        {
            lstARInvoices = new THSList<ARInvoicesInfo>();
            lstICReceipts = new THSList<ICReceiptsInfo>();
            lstICTransfers = new THSList<ICTransfersInfo>();
            lstAPReturnSuppliers = new THSList<APReturnSuppliersInfo>();
            lstARSaleOrders = new THSList<ARSaleOrdersInfo>();
        }
        #endregion

        #region Initalize Module list
        public override void InitModuleObjectList()
        {
            lstARInvoices.InitTHSList(this, String.Empty, THSUtil.GetTableNameFromBusinessObjectType(typeof(ARInvoicesInfo)));
            lstICReceipts.InitTHSList(this, String.Empty, THSUtil.GetTableNameFromBusinessObjectType(typeof(ICReceiptsInfo)));
            lstICTransfers.InitTHSList(this, String.Empty, THSUtil.GetTableNameFromBusinessObjectType(typeof(ICTransfersInfo)));
            lstAPReturnSuppliers.InitTHSList(this, String.Empty, THSUtil.GetTableNameFromBusinessObjectType(typeof(APReturnSuppliersInfo)));
            lstARSaleOrders.InitTHSList(this, String.Empty, THSUtil.GetTableNameFromBusinessObjectType(typeof(ARSaleOrdersInfo)));
        }
        #endregion

        #region Initalize GridControl
        public override void InitGridControlInTHSList()
        {
            lstARInvoices.InitTHSListGridControl("fld_dgcAREODInvoices");
            lstICReceipts.InitTHSListGridControl("fld_dgcICReceipts");
            lstICTransfers.InitTHSListGridControl("fld_dgcICTransfers");
            lstAPReturnSuppliers.InitTHSListGridControl("fld_dgcAPReturnSuppliers");
            lstARSaleOrders.InitTHSListGridControl("fld_dgcARSaleOrders");
        }
        public override void SetDefaultModuleObjectsList()
        {
            lstARInvoices.SetDefaultListAndRefreshGridControl();
            lstICReceipts.SetDefaultListAndRefreshGridControl();
            lstICTransfers.SetDefaultListAndRefreshGridControl();
            lstAPReturnSuppliers.SetDefaultListAndRefreshGridControl();
            lstARSaleOrders.SetDefaultListAndRefreshGridControl();
        }
        #endregion
    }
}
